900
How can I prevent a link to end to a specified bar
with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		AllowLinkBars := True;
		LevelCount := 2;
		PaneWidth[False] := 160;
		FirstVisibleDate := '6/20/2005';
	end;
	with Items do
	begin
		h := AddItem('Not-End-Linkable');
		AddBar(h,'Unknown','6/21/2005','6/28/2005',Nil,Nil);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarCanEndLink] := TObject(False);
		AddBar(AddItem('Task 1'),'Task','6/23/2005','6/27/2005','',Nil);
		AddBar(AddItem('Task 2'),'Task','6/23/2005','6/27/2005','',Nil);
	end;
	EndUpdate();
end
899
How can I prevent a link to start from a specified bar
with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		AllowLinkBars := True;
		LevelCount := 2;
		PaneWidth[False] := 160;
		FirstVisibleDate := '6/20/2005';
	end;
	with Items do
	begin
		h := AddItem('Not-Start-Linkable');
		AddBar(h,'Unknown','6/21/2005','6/28/2005',Nil,Nil);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarCanStartLink] := TObject(False);
		AddBar(AddItem('Task 1'),'Task','6/23/2005','6/27/2005','',Nil);
		AddBar(AddItem('Task 2'),'Task','6/23/2005','6/27/2005','',Nil);
	end;
	EndUpdate();
end
898
How can I prevent a specified bar to be linked
with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		AllowLinkBars := True;
		LevelCount := 2;
		PaneWidth[False] := 160;
		FirstVisibleDate := '6/20/2005';
	end;
	with Items do
	begin
		h := AddItem('Not-Linkable');
		AddBar(h,'Unknown','6/21/2005','6/28/2005',Nil,Nil);
		ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarCanBeLinked] := TObject(False);
		AddBar(AddItem('Task 1'),'Task','6/23/2005','6/27/2005','',Nil);
		AddBar(AddItem('Task 2'),'Task','6/23/2005','6/27/2005','',Nil);
	end;
	EndUpdate();
end
897
How can I display in the chart's header only days where the week starts

with AxG2antt1 do
begin
	with Chart do
	begin
		PaneWidth[False] := 0;
		FirstVisibleDate := '1/31/2009';
		LevelCount := 2;
		FirstWeekDay := EXG2ANTTLib.WeekDayEnum.exMonday;
		with Level[0] do
		begin
			Label := '<%mmmm%> <%yyyy%>';
			Alignment := EXG2ANTTLib.AlignmentEnum.CenterAlignment;
			Unit := EXG2ANTTLib.UnitEnum.exMonth;
		end;
		with Level[1] do
		begin
			Unit := EXG2ANTTLib.UnitEnum.exDay;
			FormatLabel := ' (0:=weekday(dvalue)) = 1 ? ''<b>'' +value : '''' ';
		end;
		UnitWidth := 23;
	end;
end
896
Is there any automatically way to display and change the bar's duration in the columns section

with AxG2antt1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	with Columns do
	begin
		Add('Tasks');
		with (Add('Duration') as EXG2ANTTLib.Column) do
		begin
			Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(513);
			Editor.EditType := EXG2ANTTLib.EditTypeEnum.SpinType;
		end;
	end;
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2009';
	end;
	with Items do
	begin
		AllowCellValueToItemBar := True;
		AddBar(AddItem('Task 1'),'Task','1/2/2009','1/7/2009',Nil,Nil);
		AddBar(AddItem('Task 2'),'Task','1/4/2009','1/9/2009',Nil,Nil);
	end;
	EndUpdate();
end
895
How can I programatically move or resize a bar using spin or slider controls in the columns

with AxG2antt1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	with Columns do
	begin
		Add('Tasks');
		with (Add('Start') as EXG2ANTTLib.Column) do
		begin
			Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(1);
			Editor.EditType := EXG2ANTTLib.EditTypeEnum.SpinType;
		end;
		with (Add('End') as EXG2ANTTLib.Column) do
		begin
			Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(2);
			Editor.EditType := EXG2ANTTLib.EditTypeEnum.SpinType;
		end;
	end;
	with Chart do
	begin
		LevelCount := 2;
		ShowEmptyBars := 1;
		FirstVisibleDate := '1/1/2009';
	end;
	with Items do
	begin
		AllowCellValueToItemBar := True;
		AddBar(AddItem('Task 1'),'Task','1/2/2009','1/7/2009',Nil,Nil);
		AddBar(AddItem('Task 2'),'Task','1/4/2009','1/9/2009',Nil,Nil);
	end;
	EndUpdate();
end
894
I am trying to call the ItemBar(exBarStart) after curent ending point, and the bar is not updated. What I am doing wrong
with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		PaneWidth[False] := 64;
		FirstVisibleDate := '6/21/2005';
		ShowEmptyBars := 1;
	end;
	with Items do
	begin
		h := AddItem('Test');
		AddBar(h,'Task','6/22/2005','6/26/2005','',Nil);
		AddBar(h,'Task','6/27/2005',ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarEnd],Nil,Nil);
	end;
	EndUpdate();
end
893
How can change in the same time the starting and ending points of the bar
with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		PaneWidth[False] := 64;
		FirstVisibleDate := '6/21/2005';
		ShowEmptyBars := 1;
	end;
	with Items do
	begin
		h := AddItem('Test');
		AddBar(h,'Task','6/22/2005','6/26/2005',Nil,Nil);
	end;
	with Items do
	begin
		h := FirstVisibleItem;
		AddBar(h,'Task','6/27/2005','6/29/2005',Nil,Nil);
	end;
	EndUpdate();
end
892
How can I control the exBarEffort property of the bar using slider controls

with AxG2antt1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	ShowFocusRect := False;
	OnResizeControl := EXG2ANTTLib.OnResizeControlEnum.exResizeChart;
	(Columns.Add('Tasks') as EXG2ANTTLib.Column).AllowDragging := False;
	with (Columns.Add('Histogram') as EXG2ANTTLib.Column) do
	begin
		AllowDragging := False;
		Def[EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
		PartialCheck := True;
		AllowSizing := False;
		Width := 18;
		LevelKey := TObject(1);
	end;
	Items.AllowCellValueToItemBar := True;
	with (Columns.Add('Effort') as EXG2ANTTLib.Column) do
	begin
		LevelKey := TObject(1);
		AllowDragging := False;
		AllowSizing := False;
		Width := 64;
		Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(21);
		with Editor do
		begin
			EditType := EXG2ANTTLib.EditTypeEnum.SliderType;
			Option[EXG2ANTTLib.EditorOptionEnum.exSliderWidth] := TObject(-100);
			Option[EXG2ANTTLib.EditorOptionEnum.exSliderMax] := TObject(9);
			Option[EXG2ANTTLib.EditorOptionEnum.exSliderMin] := TObject(1);
		end;
	end;
	with Chart do
	begin
		LevelCount := 3;
		NonworkingDays := 0;
		PaneWidth[False] := 160;
		FirstVisibleDate := '6/20/2005';
		HistogramVisible := True;
		HistogramView := EXG2ANTTLib.HistogramViewEnum($10000 Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramNoGrouping) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramRecLeafItems) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramLeafItems) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramUnlockedItems) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramCheckedItems));
		HistogramHeight := 64;
		with Bars.Item['Task'] do
		begin
			HistogramCriticalColor := $ff;
			HistogramPattern := EXG2ANTTLib.PatternEnum.exBezierCurve;
			HistogramType := EXG2ANTTLib.HistogramTypeEnum.exHistOverAllocation;
		end;
	end;
	with Items do
	begin
		h := AddItem('Project 1');
		AddBar(h,'Summary','6/21/2005','7/1/2005',Nil,Nil);
		CellEditorVisible[TObject(h),TObject(2)] := EXG2ANTTLib.EditorVisibleEnum.exEditorHidden;
		CellValue[TObject(h),TObject(2)] := '';
		h1 := InsertItem(h,Nil,'Task 1');
		AddBar(h1,'Task','6/21/2005','6/28/2005',Nil,Nil);
		CellMerge[TObject(h1),TObject(0)] := TObject(1);
		DefineSummaryBars(h,'',h1,'');
		h1 := InsertItem(h,Nil,'Task 2');
		AddBar(h1,'Task','6/23/2005','7/1/2005','',Nil);
		CellMerge[TObject(h1),TObject(0)] := TObject(1);
		DefineSummaryBars(h,'',h1,'');
		ItemBar[h1,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort] := TObject(5);
		h1 := InsertItem(h,Nil,'Task 3');
		AddBar(h1,'Task','6/25/2005','6/27/2005','',Nil);
		CellMerge[TObject(h1),TObject(0)] := TObject(1);
		DefineSummaryBars(h,'',h1,'');
		ExpandItem[h] := True;
		CellState[TObject(h),TObject(1)] := 1;
		h := AddItem('Project 2');
		AddBar(h,'Summary','3/7/2005','7/12/2005',Nil,Nil);
		CellEditorVisible[TObject(h),TObject(2)] := EXG2ANTTLib.EditorVisibleEnum.exEditorHidden;
		CellValue[TObject(h),TObject(2)] := '';
		h1 := InsertItem(h,Nil,'Task 1');
		AddBar(h1,'Task','7/3/2005','7/8/2005',Nil,Nil);
		CellMerge[TObject(h1),TObject(0)] := TObject(1);
		DefineSummaryBars(h,'',h1,'');
		h1 := InsertItem(h,Nil,'Task 2');
		AddBar(h1,'Task','7/5/2005','7/12/2005','',Nil);
		CellMerge[TObject(h1),TObject(0)] := TObject(1);
		DefineSummaryBars(h,'',h1,'');
		ItemBar[h1,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort] := TObject(5);
		h1 := InsertItem(h,Nil,'Task 3');
		AddBar(h1,'Task','7/7/2005','7/8/2005','',Nil);
		CellMerge[TObject(h1),TObject(0)] := TObject(1);
		DefineSummaryBars(h,'',h1,'');
		ExpandItem[h] := True;
		CellState[TObject(h),TObject(1)] := 1;
	end;
	EndUpdate();
end
891
How can I determine if there is any Redo operation
with AxG2antt1 do
begin
	with Chart do
	begin
		AllowUndoRedo := True;
		LevelCount := 2;
		FirstVisibleDate := '1/1/2001';
	end;
	Columns.Add('Column');
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2001','1/4/2001',Nil,Nil);
		AddBar(AddItem('Item 2'),'Task','1/3/2001','1/7/2001',Nil,Nil);
	end;
	var_CanRedo := Chart.CanRedo;
end
890
How can I determine if there is any Undo operation
with AxG2antt1 do
begin
	with Chart do
	begin
		AllowUndoRedo := True;
		LevelCount := 2;
		FirstVisibleDate := '1/1/2001';
	end;
	Columns.Add('Column');
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2001','1/4/2001',Nil,Nil);
		AddBar(AddItem('Item 2'),'Task','1/3/2001','1/7/2001',Nil,Nil);
	end;
	var_CanUndo := Chart.CanUndo;
end
889
How can I turn on the Undo/Redo feature
with AxG2antt1 do
begin
	with Chart do
	begin
		AllowUndoRedo := True;
		LevelCount := 2;
		FirstVisibleDate := '1/1/2001';
	end;
	Columns.Add('Column');
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2001','1/4/2001',Nil,Nil);
		AddBar(AddItem('Item 2'),'Task','1/3/2001','1/7/2001',Nil,Nil);
	end;
end
888
How can I disable resizing the histogram at runtime
with AxG2antt1 do
begin
	OnResizeControl := EXG2ANTTLib.OnResizeControlEnum.exDisableHistogram;
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		HistogramVisible := True;
		HistogramHeight := 32;
		Bars.Item['Task'].HistogramPattern := EXG2ANTTLib.PatternEnum.exPatternBDiagonal;
	end;
	Columns.Add('Column');
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2001','1/4/2001',Nil,Nil);
		AddBar(AddItem('Item 2'),'Task','1/3/2001','1/7/2001',Nil,Nil);
	end;
end
887
How can I display automatically the start and end dates of the bars in the columns section

with AxG2antt1 do
begin
	BeginUpdate();
	with Columns do
	begin
		Add('Tasks');
		with (Add('Start') as EXG2ANTTLib.Column) do
		begin
			Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(1);
			Editor.EditType := EXG2ANTTLib.EditTypeEnum.DateType;
		end;
		with (Add('End') as EXG2ANTTLib.Column) do
		begin
			Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(2);
			Editor.EditType := EXG2ANTTLib.EditTypeEnum.DateType;
		end;
	end;
	with Chart do
	begin
		FirstVisibleDate := '9/20/2006';
		AllowLinkBars := True;
		AllowCreateBar := EXG2ANTTLib.CreateBarEnum.exNoCreateBar;
		LevelCount := 2;
		PaneWidth[False] := 196;
	end;
	with Items do
	begin
		AllowCellValueToItemBar := True;
		AddBar(AddItem('Task 1'),'Task','9/21/2006','9/24/2006',Nil,Nil);
		AddBar(AddItem('Task 2'),'Task','9/22/2006','9/25/2006',Nil,Nil);
		AddBar(AddItem('Task 3'),'Task','9/23/2006','9/26/2006',Nil,Nil);
	end;
	EndUpdate();
end
886
How can I enable Undo/Redo support
with AxG2antt1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	DrawGridLines := EXG2ANTTLib.GridLinesEnum.exHLines;
	with Columns do
	begin
		Add('Tasks');
		with (Add('Start') as EXG2ANTTLib.Column) do
		begin
			Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(1);
			Editor.EditType := EXG2ANTTLib.EditTypeEnum.DateType;
			LevelKey := TObject(1);
		end;
		with (Add('End') as EXG2ANTTLib.Column) do
		begin
			Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(2);
			Editor.EditType := EXG2ANTTLib.EditTypeEnum.DateType;
			LevelKey := TObject(1);
		end;
	end;
	with Chart do
	begin
		DrawGridLines := EXG2ANTTLib.GridLinesEnum.exHLines;
		FirstVisibleDate := '9/20/2006';
		AllowLinkBars := True;
		AllowCreateBar := EXG2ANTTLib.CreateBarEnum.exNoCreateBar;
		LevelCount := 2;
		PaneWidth[False] := 196;
		AllowUndoRedo := True;
	end;
	with Items do
	begin
		AllowCellValueToItemBar := True;
		AddBar(AddItem('Task 1'),'Task','9/21/2006','9/24/2006',Nil,Nil);
		AddBar(AddItem('Task 2'),'Task','9/22/2006','9/25/2006',Nil,Nil);
		AddBar(AddItem('Task 3'),'Task','9/23/2006','9/26/2006',Nil,Nil);
	end;
	EndUpdate();
end
885
Is there any option to update the bar's properties once the cell's value is changed ( associate the cell with bar )

with AxG2antt1 do
begin
	BeginUpdate();
	Debug := True;
	MarkSearchColumn := False;
	Items.AllowCellValueToItemBar := True;
	with Columns do
	begin
		Add('Tasks');
		(Add('Start') as EXG2ANTTLib.Column).Editor.EditType := EXG2ANTTLib.EditTypeEnum.DateType;
		(Add('End') as EXG2ANTTLib.Column).Editor.EditType := EXG2ANTTLib.EditTypeEnum.DateType;
		Add('Info');
	end;
	with Chart do
	begin
		FirstVisibleDate := '9/20/2006';
		AllowLinkBars := False;
		AllowCreateBar := EXG2ANTTLib.CreateBarEnum.exNoCreateBar;
		LevelCount := 2;
		PaneWidth[False] := 224;
	end;
	with Items do
	begin
		h1 := InsertItem(Nil,Nil,'Task 1');
		AddBar(h1,'Task','9/21/2006','9/23/2006','A','Caption');
		ItemBar[h1,'A',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
		CellEditor[TObject(h1),TObject(3)].EditType := EXG2ANTTLib.EditTypeEnum.EditType;
		CellValueToItemBar(TObject(h1),TObject(1),EXG2ANTTLib.ItemBarPropertyEnum.exBarStart,'A');
		CellValueToItemBar(TObject(h1),TObject(2),EXG2ANTTLib.ItemBarPropertyEnum.exBarEnd,'A');
		CellValueToItemBar(TObject(h1),TObject(3),EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption,'A');
		h2 := InsertItem(Nil,Nil,'Task 2');
		AddBar(h2,'Task','9/22/2006','9/24/2006','B',Nil);
		with CellEditor[TObject(h2),TObject(3)] do
		begin
			EditType := EXG2ANTTLib.EditTypeEnum.SliderType;
			Option[EXG2ANTTLib.EditorOptionEnum.exSliderWidth] := TObject(-100);
		end;
		CellValueToItemBar(TObject(h2),TObject(1),EXG2ANTTLib.ItemBarPropertyEnum.exBarStart,'B');
		CellValueToItemBar(TObject(h2),TObject(2),EXG2ANTTLib.ItemBarPropertyEnum.exBarEnd,'B');
		CellValueToItemBar(TObject(h2),TObject(3),EXG2ANTTLib.ItemBarPropertyEnum.exBarTransparent,'B');
		h3 := InsertItem(Nil,Nil,'Task 3');
		AddBar(h3,'Task','9/23/2006','9/25/2006','C',Nil);
		with CellEditor[TObject(h3),TObject(3)] do
		begin
			EditType := EXG2ANTTLib.EditTypeEnum.DropDownType;
			AddItem(0,'Task',Nil);
			AddItem(1,'Progress',Nil);
			AddItem(2,'Project Summary',Nil);
			AddItem(2,'Summary',Nil);
		end;
		CellValueToItemBar(TObject(h3),TObject(1),EXG2ANTTLib.ItemBarPropertyEnum.exBarStart,'C');
		CellValueToItemBar(TObject(h3),TObject(2),EXG2ANTTLib.ItemBarPropertyEnum.exBarEnd,'C');
		CellValueToItemBar(TObject(h3),TObject(3),EXG2ANTTLib.ItemBarPropertyEnum.exBarName,'C');
	end;
	EndUpdate();
end
884
Is there any option to update the bar's properties once the cell's value is changed ( associate the column/cell with bars )

with AxG2antt1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	Indent := 11;
	HasLines := EXG2ANTTLib.HierarchyLineEnum.exSolidLine;
	Items.AllowCellValueToItemBar := True;
	with Columns do
	begin
		Add('Tasks');
		with (Add('Start') as EXG2ANTTLib.Column) do
		begin
			Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(1);
			Editor.EditType := EXG2ANTTLib.EditTypeEnum.DateType;
			LevelKey := TObject(1);
		end;
		with (Add('End') as EXG2ANTTLib.Column) do
		begin
			Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(2);
			Editor.EditType := EXG2ANTTLib.EditTypeEnum.DateType;
			LevelKey := TObject(1);
		end;
		with (Add('Transparency') as EXG2ANTTLib.Column) do
		begin
			Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(19);
			with Editor do
			begin
				EditType := EXG2ANTTLib.EditTypeEnum.SliderType;
				Option[EXG2ANTTLib.EditorOptionEnum.exSliderWidth] := TObject(-100);
			end;
		end;
	end;
	with Chart do
	begin
		FirstVisibleDate := '9/20/2006';
		AllowLinkBars := False;
		AllowCreateBar := EXG2ANTTLib.CreateBarEnum.exNoCreateBar;
		LevelCount := 2;
		PaneWidth[False] := 224;
	end;
	with Items do
	begin
		h := AddItem('Project');
		AddBar(h,'Summary','9/21/2006','10/3/2006',Nil,Nil);
		CellEditorVisible[TObject(h),TObject(1)] := EXG2ANTTLib.EditorVisibleEnum.exEditorHidden;
		CellEditorVisible[TObject(h),TObject(2)] := EXG2ANTTLib.EditorVisibleEnum.exEditorHidden;
		h1 := InsertItem(h,Nil,'Task 1');
		AddBar(h1,'Task','9/21/2006','9/24/2006',Nil,Nil);
		h2 := InsertItem(h,Nil,'Task 2');
		AddBar(h2,'Task','9/24/2006','9/28/2006',Nil,Nil);
		h3 := InsertItem(h,Nil,'Task 3');
		AddBar(h3,'Task','9/28/2006','10/3/2006',Nil,Nil);
		DefineSummaryBars(h,'',h1,'');
		DefineSummaryBars(h,'',h2,'');
		DefineSummaryBars(h,'',h3,'');
		ExpandItem[h] := True;
		ItemBold[h] := True;
	end;
	EndUpdate();
end
883
How can I group two bars so I can specify the range or the limit of the interval between them

with AxG2antt1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	OnResizeControl := EXG2ANTTLib.OnResizeControlEnum.exResizeChart;
	Columns.Add('Tasks');
	(Columns.Add('Start') as EXG2ANTTLib.Column).Visible := False;
	(Columns.Add('End') as EXG2ANTTLib.Column).Visible := False;
	with Chart do
	begin
		FirstVisibleDate := '9/20/2006';
		PaneWidth[False] := 64;
	end;
	with Items do
	begin
		h := AddItem('Project');
		CellValue[TObject(h),TObject(1)] := '9/21/2006';
		CellValue[TObject(h),TObject(2)] := '10/3/2006';
		AddBar(h,'Summary',CellValue[TObject(h),TObject(1)],CellValue[TObject(h),TObject(2)],'sum',Nil);
		h1 := InsertItem(h,Nil,'Task 1');
		CellValue[TObject(h1),TObject(1)] := CellValue[TObject(h),TObject(1)];
		CellValue[TObject(h1),TObject(2)] := '9/24/2006';
		AddBar(h1,'Task',CellValue[TObject(h1),TObject(1)],CellValue[TObject(h1),TObject(2)],'K1',Nil);
		h2 := InsertItem(h,Nil,'Task 2');
		CellValue[TObject(h2),TObject(1)] := CellValue[TObject(h1),TObject(2)];
		CellValue[TObject(h2),TObject(2)] := '9/28/2006';
		AddBar(h2,'Unknown',CellValue[TObject(h2),TObject(1)],CellValue[TObject(h2),TObject(2)],'K2',Nil);
		AddLink('L1',h1,'K1',h2,'K2');
		h3 := InsertItem(h,Nil,'Task 3');
		CellValue[TObject(h3),TObject(1)] := CellValue[TObject(h2),TObject(2)];
		CellValue[TObject(h3),TObject(2)] := CellValue[TObject(h),TObject(2)];
		AddBar(h3,'Task',CellValue[TObject(h3),TObject(1)],CellValue[TObject(h3),TObject(2)],'K3',Nil);
		AddLink('L2',h2,'K2',h3,'K3');
		GroupBars(h1,'K1',False,h2,'K2',True,TObject(31),'0;4');
		GroupBars(h2,'K2',False,h3,'K3',True,TObject(31),'0;2');
		DefineSummaryBars(h,'sum',h1,'K1');
		DefineSummaryBars(h,'sum',h2,'K2');
		DefineSummaryBars(h,'sum',h3,'K3');
		ExpandItem[h] := True;
		ItemBold[h] := True;
	end;
	EndUpdate();
end
882
How can I group my bars so I can resize the interval between them but still keep the lengths of them

with AxG2antt1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	OnResizeControl := EXG2ANTTLib.OnResizeControlEnum.exResizeChart;
	Columns.Add('Tasks');
	(Columns.Add('Start') as EXG2ANTTLib.Column).Visible := False;
	(Columns.Add('End') as EXG2ANTTLib.Column).Visible := False;
	with Chart do
	begin
		FirstVisibleDate := '9/20/2006';
		PaneWidth[False] := 64;
	end;
	with Items do
	begin
		h := AddItem('Project');
		CellValue[TObject(h),TObject(1)] := '9/21/2006';
		CellValue[TObject(h),TObject(2)] := '10/3/2006';
		AddBar(h,'Summary',CellValue[TObject(h),TObject(1)],CellValue[TObject(h),TObject(2)],Nil,Nil);
		h1 := InsertItem(h,Nil,'Task 1');
		CellValue[TObject(h1),TObject(1)] := CellValue[TObject(h),TObject(1)];
		CellValue[TObject(h1),TObject(2)] := '9/24/2006';
		AddBar(h1,'Task',CellValue[TObject(h1),TObject(1)],CellValue[TObject(h1),TObject(2)],Nil,Nil);
		h2 := InsertItem(h,Nil,'Task 2');
		CellValue[TObject(h2),TObject(1)] := CellValue[TObject(h1),TObject(2)];
		CellValue[TObject(h2),TObject(2)] := '9/28/2006';
		AddBar(h2,'Unknown',CellValue[TObject(h2),TObject(1)],CellValue[TObject(h2),TObject(2)],Nil,Nil);
		AddLink('L1',h1,'',h2,'');
		h3 := InsertItem(h,Nil,'Task 3');
		CellValue[TObject(h3),TObject(1)] := CellValue[TObject(h2),TObject(2)];
		CellValue[TObject(h3),TObject(2)] := CellValue[TObject(h),TObject(2)];
		AddBar(h3,'Task',CellValue[TObject(h3),TObject(1)],CellValue[TObject(h3),TObject(2)],Nil,Nil);
		AddLink('L2',h2,'',h3,'');
		GroupBars(h1,'',False,h2,'',True,TObject(35),Nil);
		GroupBars(h2,'',False,h3,'',True,TObject(35),Nil);
		DefineSummaryBars(h,'',h1,'');
		DefineSummaryBars(h,'',h2,'');
		DefineSummaryBars(h,'',h3,'');
		ExpandItem[h] := True;
		ItemBold[h] := True;
	end;
	EndUpdate();
end
881
Can I group my bars so they move together when a bar inside changes, but still preserving the length of the bars

with AxG2antt1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	OnResizeControl := EXG2ANTTLib.OnResizeControlEnum.exResizeChart;
	Columns.Add('Tasks');
	(Columns.Add('Start') as EXG2ANTTLib.Column).Visible := False;
	(Columns.Add('End') as EXG2ANTTLib.Column).Visible := False;
	with Chart do
	begin
		FirstVisibleDate := '9/20/2006';
		PaneWidth[False] := 64;
	end;
	with Items do
	begin
		h := AddItem('Project');
		CellValue[TObject(h),TObject(1)] := '9/21/2006';
		CellValue[TObject(h),TObject(2)] := '10/3/2006';
		AddBar(h,'Summary',CellValue[TObject(h),TObject(1)],CellValue[TObject(h),TObject(2)],Nil,Nil);
		h1 := InsertItem(h,Nil,'Task 1');
		CellValue[TObject(h1),TObject(1)] := CellValue[TObject(h),TObject(1)];
		CellValue[TObject(h1),TObject(2)] := '9/24/2006';
		AddBar(h1,'Task',CellValue[TObject(h1),TObject(1)],CellValue[TObject(h1),TObject(2)],Nil,Nil);
		h2 := InsertItem(h,Nil,'Task 2');
		CellValue[TObject(h2),TObject(1)] := CellValue[TObject(h1),TObject(2)];
		CellValue[TObject(h2),TObject(2)] := '9/28/2006';
		AddBar(h2,'Unknown',CellValue[TObject(h2),TObject(1)],CellValue[TObject(h2),TObject(2)],Nil,Nil);
		AddLink('L1',h1,'',h2,'');
		h3 := InsertItem(h,Nil,'Task 3');
		CellValue[TObject(h3),TObject(1)] := CellValue[TObject(h2),TObject(2)];
		CellValue[TObject(h3),TObject(2)] := CellValue[TObject(h),TObject(2)];
		AddBar(h3,'Task',CellValue[TObject(h3),TObject(1)],CellValue[TObject(h3),TObject(2)],Nil,Nil);
		AddLink('L2',h2,'',h3,'');
		GroupBars(h1,'',False,h2,'',True,TObject(3),Nil);
		GroupBars(h2,'',False,h3,'',True,TObject(3),Nil);
		DefineSummaryBars(h,'',h1,'');
		DefineSummaryBars(h,'',h2,'');
		DefineSummaryBars(h,'',h3,'');
		ExpandItem[h] := True;
		ItemBold[h] := True;
	end;
	EndUpdate();
end
880
How can I split the time scale, so a section displays days, while other displays weeks, and the other months

with AxG2antt1 do
begin
	BeginUpdate();
	HeaderHeight := 24;
	Columns.Add('Default');
	with Chart do
	begin
		DrawDateTicker := True;
		DrawGridLines := EXG2ANTTLib.GridLinesEnum.exVLines;
		NonworkingDays := 0;
		PaneWidth[False] := 0;
		FirstVisibleDate := '1/1/2007';
		LevelCount := 3;
		with Level[0] do
		begin
			Label := '<%yyyy%>';
			Unit := EXG2ANTTLib.UnitEnum.exYear;
		end;
		with Level[1] do
		begin
			Alignment := EXG2ANTTLib.AlignmentEnum.CenterAlignment;
			Label := '<%hy%>';
			Unit := EXG2ANTTLib.UnitEnum.exHalfYear;
			ReplaceLabel['1'] := '<b>1/2</b>';
			ReplaceLabel['2'] := '<b>2/2</b>';
		end;
		with Level[2] do
		begin
			Label := '<%mmm%>';
			Unit := EXG2ANTTLib.UnitEnum.exMonth;
		end;
		UnitWidth := 28;
		AllowInsideZoom := True;
		with DefaultInsideZoomFormat do
		begin
			OwnerLabel := '<b><%mmmm%></b> (weeks) ';
			InsideLabel := '<font ;6>W: <b><%ww%></b>';
			InsideUnit := EXG2ANTTLib.UnitEnum.exWeek;
		end;
		with InsideZooms do
		begin
			SplitBaseLevel := False;
			with Add('1/1/2007') do
			begin
				AllowCustomFormat := True;
				with CustomFormat do
				begin
					OwnerLabel := '<b><%mmmm%></b> (weeks) ';
					InsideLabel := '<font ;6>W: <b><%ww%></b>';
					InsideUnit := EXG2ANTTLib.UnitEnum.exWeek;
					BackColorChart := $f0e7bb;
				end;
			end;
			with Add('3/1/2007') do
			begin
				AllowCustomFormat := True;
				Width := 356;
				with CustomFormat do
				begin
					OwnerLabel := '<b><%mmmm%></b> (days) ';
					InsideLabel := '<font ;5><%d%></font>';
					InsideUnit := EXG2ANTTLib.UnitEnum.exDay;
					BackColorChart := $f0c891;
				end;
			end;
		end;
	end;
	with Items do
	begin
		h := AddItem('Task 1 ');
		AddBar(h,'Task','1/12/2007','3/9/2007',Nil,Nil);
		h := AddItem('Task 2');
		AddBar(h,'Task','1/25/2007','3/12/2007',Nil,Nil);
		h := AddItem('Task 3');
		AddBar(h,'Task','2/1/2007','2/8/2007','B1',Nil);
		AddBar(h,'Task','2/8/2007','2/15/2007','B2',Nil);
		AddBar(h,'Task','2/15/2007','2/22/2007','B3',Nil);
		AddBar(h,'Task','2/22/2007','2/28/2007','B4',Nil);
	end;
	EndUpdate();
end
879
How can I define a bar that shows two colors, one up and one down, without using skin or EBN files

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	with Chart.Bars.Add('A') do
	begin
		Color := $ff;
		Shape := EXG2ANTTLib.ShapeBarEnum.exShapeSolidUp;
		Pattern := EXG2ANTTLib.PatternEnum.exPatternSolid;
	end;
	with Chart.Bars.Add('B') do
	begin
		Color := $80;
		Shape := EXG2ANTTLib.ShapeBarEnum.exShapeSolidDown;
		Pattern := EXG2ANTTLib.PatternEnum.exPatternSolid;
	end;
	Chart.Bars.Add('A%B').Shortcut := 'AB';
	with Items do
	begin
		h := AddItem('Task 1');
		AddBar(h,'AB','1/2/2001','1/6/2001','K1',Nil);
		ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarPercent] := TObject(1);
		ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarCanResizePercent] := TObject(False);
	end;
	EndUpdate();
end
878
Does your control support RightToLeft property for RTL languages or right to left
with AxG2antt1 do
begin
	BeginUpdate();
	ScrollBars := EXG2ANTTLib.ScrollBarsEnum.exDisableBoth;
	LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot;
	with (Columns.Add('P1') as EXG2ANTTLib.Column) do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
		PartialCheck := True;
	end;
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Nil,'Child 1');
		InsertItem(h,Nil,'Child 2');
		ExpandItem[h] := True;
	end;
	RightToLeft := True;
	EndUpdate();
end
877
Is there any way to display the vertical scroll bar on the left side, as I want to align my data to the right
with AxG2antt1 do
begin
	BeginUpdate();
	ScrollBars := EXG2ANTTLib.ScrollBarsEnum.exDisableBoth;
	with Columns do
	begin
		Add('C1');
		Add('C2');
		Add('C3');
		Add('C4');
		Add('C5');
		Add('C6');
		Add('C7');
		Add('C8');
	end;
	RightToLeft := True;
	EndUpdate();
end
876
Can I display the cell's check box after the text
with AxG2antt1 do
begin
	with (Columns.Add('Column') as EXG2ANTTLib.Column) do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
		Def[EXG2ANTTLib.DefColumnEnum.exCellDrawPartsOrder] := 'caption,check';
	end;
	with Items do
	begin
		CellHasCheckBox[TObject(AddItem('Caption 1')),TObject(0)] := True;
		CellHasCheckBox[TObject(AddItem('Caption 2')),TObject(0)] := True;
	end;
end
875
Can I change the order of the parts in the cell, as checkbox after the text, and so on
with AxG2antt1 do
begin
	Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 
	'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 
	'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 
	'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
	(Columns.Add('Column') as EXG2ANTTLib.Column).Def[EXG2ANTTLib.DefColumnEnum.exCellDrawPartsOrder] := 'caption,check,icon,icons,picture';
	with Items do
	begin
		h := AddItem('Text');
		CellImage[TObject(h),TObject(0)] := 1;
		CellHasCheckBox[TObject(h),TObject(0)] := True;
	end;
end
874
Can I have an image displayed after the text. Can I get that effect without using HTML content
with AxG2antt1 do
begin
	Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 
	'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 
	'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 
	'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
	(Columns.Add('Column') as EXG2ANTTLib.Column).Def[EXG2ANTTLib.DefColumnEnum.exCellDrawPartsOrder] := 'caption,icon,check,icons,picture';
	with Items do
	begin
		h := AddItem('Text');
		CellImage[TObject(h),TObject(0)] := 1;
	end;
end
873
My problem is that I want to mark the cells from every second item in the gant with a other backgroundcolor

with AxG2antt1 do
begin
	with Chart do
	begin
		PaneWidth[False] := 0;
		FirstVisibleDate := '1/17/2008';
		LevelCount := 2;
		UnitScale := EXG2ANTTLib.UnitEnum.exSecond;
		Level[1].FormatLabel := '(0:=sec(dvalue)) mod 2 ? 0=: : ''<bgcolor=00FF00>'' + 0=:';
	end;
end
872
Is there any option to print the columns section on each page

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Col 1');
	Columns.Add('Col 2');
	MarkSearchColumn := False;
	Chart.FirstVisibleDate := '1/1/2001';
	Chart.LevelCount := 2;
	with Items do
	begin
		h1 := AddItem('Col 1');
		CellValue[TObject(h1),TObject(1)] := 'Col 2';
		AddBar(h1,'Task','1/2/2001','1/4/2001','K1',Nil);
		h2 := AddItem('Col 1');
		CellValue[TObject(h2),TObject(1)] := 'Col 2';
		AddBar(h2,'Task','2/5/2001','2/7/2001','K2',Nil);
		AddLink('L1',h1,'K1',h2,'K2');
		Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkStartPos] := TObject(0);
	end;
	EndUpdate();
	with (ComObj.CreateComObject(ComObj.ProgIDToClassID('Exontrol.Print')) as EXPRINTLib.Print) do
	begin
		Options := 'ColumnsOnEveryPage=-2';
		PrintExt := (AxG2antt1.GetOcx() as EXG2ANTTLib.G2antt).DefaultDispatch;
		Preview();
	end;
end
871
How can I add a different non-working area for different items

with AxG2antt1 do
begin
	Columns.Add('Non-Work');
	with Chart do
	begin
		FirstWeekDay := EXG2ANTTLib.WeekDayEnum.exMonday;
		FirstVisibleDate := '1/24/2008';
		PaneWidth[False] := 52;
		LevelCount := 2;
	end;
	with Items do
	begin
		h := AddItem('January');
		ItemNonworkingUnits[h,TObject(False)] := 'month(value) = 1';
		h := AddItem('February, Saturday, Sunday');
		ItemNonworkingUnits[h,TObject(False)] := 'month(value) = 2 or (weekday(value) = 0 or weekday(value) = 6)';
		h := AddItem('Sunday');
		ItemNonworkingUnits[h,TObject(False)] := 'weekday(value) = 0';
	end;
end
870
How can I define different non-working units for different items

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		PaneWidth[False] := 78;
		AllowCreateBar := EXG2ANTTLib.CreateBarEnum.exCreateBarAuto;
		FirstVisibleDate := '6/20/2005';
		DrawLevelSeparator := EXG2ANTTLib.LevelLineEnum.exLevelNoLine;
		LevelCount := 3;
		Level[1].DrawGridLines := False;
		AllowInsideZoom := True;
		DrawDateTicker := True;
		DateTickerLabel := '<%mmm%> <%d%><br><b><%hh%>:<%nn%></b>';
		MarkSelectDateColor := $7ffff8ee;
		with DefaultInsideZoomFormat do
		begin
			OwnerLabel := '<%mmm%> <%d%>';
			BackColor := $fff8ee;
			BackColorChart := BackColor;
			InsideCount := 4;
			InsideLabel := '<b><%hh%></b>';
		end;
		InsideZooms.Add('6/22/2005');
		DrawGridLines := EXG2ANTTLib.GridLinesEnum.exVLines;
		Bars.Item['Split'].Color := $ff;
		with Bars.Add('Task:Split') do
		begin
			Color := $ff;
			Pattern := EXG2ANTTLib.PatternEnum.exPatternBDiagonal;
			Shortcut := 'TaskS';
		end;
	end;
	with Items do
	begin
		h := AddItem('Project 1');
		AddBar(h,'Summary','6/21/2005','7/1/2005',Nil,Nil);
		h1 := InsertItem(h,Nil,'Task 1');
		AddBar(h1,'TaskS','6/21/2005','6/28/2005',Nil,Nil);
		ItemNonworkingUnits[h1,TObject(False)] := 'weekday(value)=1 or weekday(value)=2';
		ItemNonworkingUnits[h1,TObject(True)] := 'weekday(value)=1 or weekday(value)=2 or (hour(value)<8 or hour(value)>=16 )';
		DefineSummaryBars(h,'',h1,'');
		h1 := InsertItem(h,Nil,'Task 2');
		AddBar(h1,'TaskS','6/22/2005 4:00:00 AM','7/1/2005','E',Nil);
		ItemNonworkingUnits[h1,TObject(False)] := 'weekday(value)=0';
		ItemNonworkingUnits[h1,TObject(True)] := 'weekday(value)=0 or hour(value)<4 or hour(value)>19';
		DefineSummaryBars(h,'',h1,'E');
		ItemBar[h1,'E',EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort] := TObject(5);
		h1 := InsertItem(h,Nil,'Task 3');
		AddBar(h1,'TaskS','6/22/2005 12:00:00 PM','6/27/2005','E',Nil);
		ItemNonworkingUnits[h1,TObject(False)] := 'weekday(value)=1 or weekday(value)=2';
		ItemNonworkingUnits[h1,TObject(True)] := 'weekday(value)=1 or weekday(value)=2 or (hour(value)<8 or hour(value)>=16 )';
		DefineSummaryBars(h,'',h1,'E');
		ExpandItem[h] := True;
		h := AddItem('Project 2');
		AddBar(h,'Summary','6/26/2005','7/6/2005',Nil,Nil);
		h1 := InsertItem(h,Nil,'TaskS 1');
		AddBar(h1,'TaskS','6/26/2005','7/2/2005',Nil,Nil);
		DefineSummaryBars(h,'',h1,'');
		h1 := InsertItem(h,Nil,'TaskS 2');
		AddBar(h1,'TaskS','6/28/2005','7/6/2005','E',Nil);
		DefineSummaryBars(h,'',h1,'E');
		ItemBar[h1,'E',EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort] := TObject(5);
		h1 := InsertItem(h,Nil,'TaskS 3');
		AddBar(h1,'TaskS','6/30/2005','7/2/2005','E',Nil);
		DefineSummaryBars(h,'',h1,'E');
		ExpandItem[h] := True;
	end;
	EndUpdate();
end
869
I want to define/highlight for specified dates as being non-working. Is this possible

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Items');
	with Chart do
	begin
		NonworkingDaysColor := $ff;
		PaneWidth[False] := 48;
		c := NonworkingDaysColor;
		p := NonworkingDaysPattern;
		FirstVisibleDate := '1/1/2001';
		with Bars.Add('NW') do
		begin
			Color := c;
			Pattern := p;
			Height := -1;
			Shape := EXG2ANTTLib.ShapeBarEnum.exShapeSolidFrameless;
		end;
	end;
	with Items do
	begin
		h := AddItem('Item 1');
		AddBar(h,'NW','1/2/2001','1/3/2001','0',Nil);
		ItemBar[h,'0',EXG2ANTTLib.ItemBarPropertyEnum.exBarSelectable] := TObject(False);
		AddBar(h,'Task','1/2/2001','1/4/2001','K2',Nil);
		h := AddItem('Item 2');
		AddBar(h,'NW','1/2/2001','1/4/2001','0',Nil);
		ItemBar[h,'0',EXG2ANTTLib.ItemBarPropertyEnum.exBarSelectable] := TObject(False);
		AddBar(h,'Task','1/2/2001','1/5/2001','K2',Nil);
	end;
	EndUpdate();
end
868
Do you have any sample how can I programmatically magnify a single date, so can show the hours, while the rest of the chart displays days

with AxG2antt1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	ShowFocusRect := False;
	Columns.Add('Tasks');
	with (Columns.Add('C') as EXG2ANTTLib.Column) do
	begin
		HeaderAlignment := EXG2ANTTLib.AlignmentEnum.CenterAlignment;
		Def[EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
		PartialCheck := True;
		AllowSizing := False;
		Width := 18;
	end;
	with Chart do
	begin
		PaneWidth[False] := 96;
		AllowCreateBar := EXG2ANTTLib.CreateBarEnum.exCreateBarAuto;
		FirstVisibleDate := '6/20/2005';
		DrawLevelSeparator := EXG2ANTTLib.LevelLineEnum.exLevelNoLine;
		LevelCount := 3;
		Level[1].DrawGridLines := False;
		AllowInsideZoom := True;
		DrawDateTicker := True;
		DateTickerLabel := '<%mmm%> <%d%><br><b><%hh%>:<%nn%></b>';
		MarkSelectDateColor := $7ffff8ee;
		with DefaultInsideZoomFormat do
		begin
			OwnerLabel := '<%mmm%> <%d%>';
			BackColor := $fff8ee;
			BackColorChart := BackColor;
			InsideCount := 4;
			InsideLabel := '<b><%hh%></b>';
		end;
		InsideZooms.Add('6/22/2005');
		DrawGridLines := EXG2ANTTLib.GridLinesEnum.exVLines;
	end;
	with Items do
	begin
		h := AddItem('Project 1');
		AddBar(h,'Summary','6/21/2005','7/1/2005',Nil,Nil);
		h1 := InsertItem(h,Nil,'Task 1');
		AddBar(h1,'Task','6/21/2005','6/28/2005',Nil,Nil);
		CellMerge[TObject(h1),TObject(0)] := TObject(1);
		DefineSummaryBars(h,'',h1,'');
		h1 := InsertItem(h,Nil,'Task 2');
		AddBar(h1,'Task','6/23/2005','7/1/2005','E',Nil);
		CellMerge[TObject(h1),TObject(0)] := TObject(1);
		DefineSummaryBars(h,'',h1,'E');
		ItemBar[h1,'E',EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort] := TObject(5);
		h1 := InsertItem(h,Nil,'Task 3');
		AddBar(h1,'Task','6/25/2005','6/27/2005','E',Nil);
		CellMerge[TObject(h1),TObject(0)] := TObject(1);
		DefineSummaryBars(h,'',h1,'E');
		ExpandItem[h] := True;
		CellState[TObject(h),TObject(1)] := 1;
		h := AddItem('Project 2');
		AddBar(h,'Summary','6/26/2005','7/6/2005',Nil,Nil);
		h1 := InsertItem(h,Nil,'Task 1');
		AddBar(h1,'Task','6/26/2005','7/2/2005',Nil,Nil);
		CellMerge[TObject(h1),TObject(0)] := TObject(1);
		DefineSummaryBars(h,'',h1,'');
		h1 := InsertItem(h,Nil,'Task 2');
		AddBar(h1,'Task','6/28/2005','7/6/2005','E',Nil);
		CellMerge[TObject(h1),TObject(0)] := TObject(1);
		DefineSummaryBars(h,'',h1,'E');
		ItemBar[h1,'E',EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort] := TObject(5);
		h1 := InsertItem(h,Nil,'Task 3');
		AddBar(h1,'Task','6/30/2005','7/2/2005','E',Nil);
		CellMerge[TObject(h1),TObject(0)] := TObject(1);
		DefineSummaryBars(h,'',h1,'E');
		ExpandItem[h] := True;
		CellState[TObject(h),TObject(1)] := 1;
	end;
	EndUpdate();
end
867
How can I define my own/custom labels and subdivisions

with AxG2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		ToolTip := '';
		PaneWidth[False] := 0;
		ScrollRange[EXG2ANTTLib.ScrollRangeEnum.exStartDate] := TObject(0);
		ScrollRange[EXG2ANTTLib.ScrollRangeEnum.exEndDate] := TObject(110);
		FirstVisibleDate := TObject(0);
		ShowNonworkingDates := False;
		MarkTodayColor := BackColor;
		LevelCount := 3;
		with Level[0] do
		begin
			ToolTip := '';
			Alignment := EXG2ANTTLib.AlignmentEnum.CenterAlignment;
			Unit := EXG2ANTTLib.UnitEnum.exDay;
			Count := 16;
			FormatLabel := '''Group <b>''+int(1 +dvalue/16)';
		end;
		with Level[1] do
		begin
			ToolTip := '';
			Alignment := EXG2ANTTLib.AlignmentEnum.CenterAlignment;
			Unit := EXG2ANTTLib.UnitEnum.exDay;
			Count := 4;
			FormatLabel := ' (abs(dvalue)/4) mod 4';
			ReplaceLabel['0'] := 'Sub-Group <b>1</b>';
			ReplaceLabel['1'] := 'Sub-Group <b>2</b>';
			ReplaceLabel['2'] := 'Sub-Group <b>3</b>';
			ReplaceLabel['3'] := 'Sub-Group <b>4</b>';
		end;
		with Level[2] do
		begin
			ToolTip := '';
			Unit := EXG2ANTTLib.UnitEnum.exDay;
			Count := 1;
			FormatLabel := '(abs(dvalue) mod 4)';
			ReplaceLabel['0'] := 'A';
			ReplaceLabel['1'] := 'B';
			ReplaceLabel['2'] := 'C';
			ReplaceLabel['3'] := 'D';
		end;
	end;
	EndUpdate();
end
866
I want to mark or highlight the last Friday of the month. Is there any option to do that

with AxG2antt1 do
begin
	with Chart do
	begin
		PaneWidth[False] := 0;
		FirstVisibleDate := '1/17/2008';
		LevelCount := 2;
		Level[1].FormatLabel := '(weekday(dvalue)=5 ? month(dvalue+7)!=month(dvalue) ? ''<b><bgcolor=000000><fgcolor=FFFFFF>'' ) + value';
	end;
end
865
I use the SelectDate method but the dates are not being highligted. What can I do
with AxG2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		FirstVisibleDate := '1/1/2008';
		MarkTodayColor := BackColor;
		LevelCount := 2;
		SelectLevel := 1;
		SelectDate['1/2/2008'] := True;
	end;
	EndUpdate();
end
864
Can I use ebn files to display the selected dates

with AxG2antt1 do
begin
	BeginUpdate();
	with VisualAppearance do
	begin
		Add(2,'c:\exontrol\images\normal.ebn');
		Add(1,'CP:2 0 -4 0 4');
	end;
	with Chart do
	begin
		FirstVisibleDate := '1/1/2008';
		MarkTodayColor := BackColor;
		LevelCount := 2;
		MarkSelectDateColor := $1000000;
		SelectLevel := 1;
		SelectDate['1/3/2008'] := True;
		SelectDate['1/4/2008'] := True;
	end;
	Columns.Add('Default');
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2008','1/6/2008',Nil,Nil);
		AddBar(AddItem('Item 2'),'Task','1/3/2008','1/7/2008',Nil,Nil);
		AddBar(AddItem('Item 3'),'Task','1/4/2008','1/8/2008',Nil,Nil);
		AddBar(AddItem('Item 4'),'Task','1/5/2008','1/9/2008',Nil,Nil);
	end;
	EndUpdate();
end
863
Can I use ebn files to display the selected dates

with AxG2antt1 do
begin
	BeginUpdate();
	VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
	with Chart do
	begin
		FirstVisibleDate := '1/1/2008';
		MarkTodayColor := BackColor;
		LevelCount := 2;
		MarkSelectDateColor := $1000000;
		SelectLevel := 1;
		SelectDate['1/3/2008'] := True;
	end;
	Columns.Add('Default');
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2008','1/6/2008',Nil,Nil);
		AddBar(AddItem('Item 2'),'Task','1/3/2008','1/7/2008',Nil,Nil);
		AddBar(AddItem('Item 3'),'Task','1/4/2008','1/8/2008',Nil,Nil);
	end;
	EndUpdate();
end
862
How can I change the color for selected dates to be solid

with AxG2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		PaneWidth[False] := 0;
		FirstVisibleDate := '1/1/2008';
		MarkTodayColor := BackColor;
		LevelCount := 2;
		MarkSelectDateColor := $7fff0000;
		SelectLevel := 1;
		SelectDate['1/15/2008'] := True;
		SelectDate['1/16/2008'] := True;
	end;
	EndUpdate();
end
861
How can I disable selecting dates when I click the chart's header
with AxG2antt1 do
begin
	Chart.AllowSelectDate := EXG2ANTTLib.SelectDateEnum.exNoSelectDate;
end
860
Is there any option to specify which dates can be magnified or resized
with AxG2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2008';
		AllowInsideZoom := True;
		ShowNonworkingDates := True;
		CondInsideZoom := 'not(weekday(value) = 0 or weekday(value) = 6)';
	end;
	EndUpdate();
end
859
How can I change the width for a specified date time unit

with AxG2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2008';
		AllowInsideZoom := True;
		AllowResizeInsideZoom := False;
		InsideZoomOnDblClick := False;
		with InsideZooms do
		begin
			with Add('1/4/2008') do
			begin
				Width := 32;
				AllowInsideFormat := False;
			end;
		end;
	end;
	EndUpdate();
end
858
How can I disable the control's splitter so the user can't resize the list area
with AxG2antt1 do
begin
	OnResizeControl := Integer(EXG2ANTTLib.OnResizeControlEnum.exDisableSplitter) Or Integer(EXG2ANTTLib.OnResizeControlEnum.exResizeChart);
	Chart.PaneWidth[False] := 60;
end
857
How can I disable the control's splitter so the user can't resize the chart area
with AxG2antt1 do
begin
	OnResizeControl := EXG2ANTTLib.OnResizeControlEnum.exDisableSplitter;
	Chart.PaneWidth[True] := 60;
end
856
How can I change the label for a specified unit

with AxG2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		PaneWidth[False] := 0;
		LevelCount := 2;
		FirstVisibleDate := '1/1/2008';
		AllowInsideZoom := True;
		AllowResizeInsideZoom := False;
		InsideZoomOnDblClick := False;
		DefaultInsideZoomFormat.OwnerLabel := '<b><%d%></b> <%d2%>';
		with InsideZooms do
		begin
			SplitBaseLevel := False;
			DefaultWidth := 32;
			Add('1/4/2008').AllowInsideFormat := False;
		end;
	end;
	EndUpdate();
end
855
How can I bold the inside units

with AxG2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		PaneWidth[False] := 0;
		LevelCount := 2;
		FirstVisibleDate := '1/1/2008';
		AllowInsideZoom := True;
		AllowResizeInsideZoom := False;
		InsideZoomOnDblClick := False;
		DefaultInsideZoomFormat.InsideLabel := '<b><%hh%></b>';
		InsideZooms.Add('1/4/2008');
	end;
	EndUpdate();
end
854
How can I change the scale unit when doing inside zoom ( the chart displays weeks, and we want week days )

with AxG2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		ShowNonworkingDates := False;
		PaneWidth[False] := 0;
		LevelCount := 2;
		with Level[0] do
		begin
			Label := '<%mmmm%>';
			Unit := EXG2ANTTLib.UnitEnum.exMonth;
		end;
		with Level[1] do
		begin
			Label := '<%ww%>';
			Unit := EXG2ANTTLib.UnitEnum.exWeek;
		end;
		FirstVisibleDate := '1/1/2008';
		AllowInsideZoom := True;
		with DefaultInsideZoomFormat do
		begin
			OwnerLabel := '<font ;7><%mmm%> Week: <%ww%>';
			InsideLabel := '<font ;7><b><%d1%></b>';
			InsideUnit := EXG2ANTTLib.UnitEnum.exDay;
		end;
		with InsideZooms do
		begin
			SplitBaseLevel := False;
			Add('2/3/2008');
		end;
	end;
	EndUpdate();
end
853
How can I zoom or magnify the selected date to display the hours, from 8 to 8

with AxG2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		PaneWidth[False] := 0;
		LevelCount := 2;
		FirstVisibleDate := '1/1/2008';
		AllowInsideZoom := True;
		with DefaultInsideZoomFormat do
		begin
			InsideLabel := 'H: <b><%hh%></b>';
			InsideUnit := EXG2ANTTLib.UnitEnum.exHour;
			InsideCount := 8;
		end;
		with InsideZooms do
		begin
			Add('1/4/2008');
		end;
	end;
	EndUpdate();
end
852
How can I zoom or magnify the selected date to display the hours

with AxG2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		PaneWidth[False] := 0;
		LevelCount := 2;
		FirstVisibleDate := '1/1/2008';
		AllowInsideZoom := True;
		with InsideZooms do
		begin
			Add('1/4/2008');
		end;
	end;
	EndUpdate();
end
851
How can I change the foreground color for a time unit

with AxG2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2008';
		AllowInsideZoom := True;
		AllowResizeInsideZoom := False;
		InsideZoomOnDblClick := False;
		DefaultInsideZoomFormat.ForeColor := $ff;
		with InsideZooms do
		begin
			SplitBaseLevel := False;
			DefaultWidth := 18;
			Add('1/4/2008').AllowInsideFormat := False;
		end;
	end;
	EndUpdate();
end
850
How can I change the background color for a time unit, in the chart area

with AxG2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2008';
		AllowInsideZoom := True;
		AllowResizeInsideZoom := False;
		InsideZoomOnDblClick := False;
		DefaultInsideZoomFormat.BackColorChart := $ff;
		with InsideZooms do
		begin
			SplitBaseLevel := False;
			DefaultWidth := 18;
			Add('1/4/2008').AllowInsideFormat := False;
		end;
	end;
	EndUpdate();
end
849
How can I change the background color for a time unit, using EBN files

with AxG2antt1 do
begin
	BeginUpdate();
	VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2008';
		AllowInsideZoom := True;
		AllowResizeInsideZoom := False;
		InsideZoomOnDblClick := False;
		DefaultInsideZoomFormat.BackColor := $1000000;
		with InsideZooms do
		begin
			SplitBaseLevel := False;
			DefaultWidth := 18;
			Add('1/4/2008').AllowInsideFormat := False;
		end;
	end;
	EndUpdate();
end
848
How can I change the background color for a time unit

with AxG2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2008';
		AllowInsideZoom := True;
		AllowResizeInsideZoom := False;
		InsideZoomOnDblClick := False;
		DefaultInsideZoomFormat.BackColor := $ff;
		with InsideZooms do
		begin
			SplitBaseLevel := False;
			DefaultWidth := 18;
			Add('1/4/2008').AllowInsideFormat := False;
		end;
	end;
	EndUpdate();
end
847
How can I display the column using currency format and enlarge the font for certain values
with AxG2antt1 do
begin
	with (Columns.Add('Currency') as EXG2ANTTLib.Column) do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1);
		FormatColumn := 'len(value) ? ((0:=dbl(value)) < 10 ? ''<fgcolor=808080><font ;7>'' : ''<b>'') + currency(=:0)';
	end;
	with Items do
	begin
		AddItem('1.23');
		AddItem('2.34');
		AddItem('9.94');
		AddItem('11.94');
		AddItem('1000');
	end;
end
846
How can I highlight only parts of the cells
with AxG2antt1 do
begin
	with (Columns.Add('') as EXG2ANTTLib.Column) do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1);
		FormatColumn := 'value replace ''hil'' with ''<fgcolor=FF0000><b>hil</b></fgcolor>''';
	end;
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Nil,'Child 1');
		InsertItem(h,Nil,'Child 2');
		InsertItem(h,Nil,'Child 3');
		ExpandItem[h] := True;
	end;
end
845
How can I get the number of occurrences of a specified string in the cell
with AxG2antt1 do
begin
	Columns.Add('');
	with (Columns.Add('occurrences') as EXG2ANTTLib.Column) do
	begin
		ComputedField := 'lower(%0) count ''o''';
		FormatColumn := '''contains '' + value + '' of \''o\'' chars''';
	end;
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Nil,'Child 1 oooof the root');
		InsertItem(h,Nil,'Child 2');
		InsertItem(h,Nil,'Child 3');
		ExpandItem[h] := True;
	end;
end
844
How can I display dates in my format
with AxG2antt1 do
begin
	with (Columns.Add('Date') as EXG2ANTTLib.Column) do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1);
		FormatColumn := '''<b>'' + year(0:=date(value)) + ''</b><fgcolor=808080><font ;6> ('' + month(=:0) + '' - '' + day(=:0) +'')''';
	end;
	with Items do
	begin
		AddItem('1/21/2001');
		AddItem('2/22/2002');
		AddItem('3/13/2003');
		AddItem('4/24/2004');
	end;
end
843
How can I display dates in short format
with AxG2antt1 do
begin
	(Columns.Add('Date') as EXG2ANTTLib.Column).FormatColumn := 'shortdate(value)';
	with Items do
	begin
		AddItem('1/1/2001');
		AddItem('2/2/2002');
		AddItem('3/3/2003');
		AddItem('4/4/2004');
	end;
end
842
How can I display dates in long format
with AxG2antt1 do
begin
	(Columns.Add('Date') as EXG2ANTTLib.Column).FormatColumn := 'longdate(value)';
	with Items do
	begin
		AddItem('1/1/2001');
		AddItem('2/2/2002');
		AddItem('3/3/2003');
		AddItem('4/4/2004');
	end;
end
841
How can I display only the right part of the cell
with AxG2antt1 do
begin
	Columns.Add('');
	with (Columns.Add('Right') as EXG2ANTTLib.Column) do
	begin
		ComputedField := '%0 right 2';
		FormatColumn := '''"'' + value + ''"''';
	end;
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Nil,'Child 1');
		InsertItem(h,Nil,'Child 2');
		InsertItem(h,Nil,'SChild 3');
		ExpandItem[h] := True;
	end;
end
840
How can I display only the left part of the cell
with AxG2antt1 do
begin
	Columns.Add('');
	(Columns.Add('Left') as EXG2ANTTLib.Column).ComputedField := '%0 left 2';
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Nil,'Child 1');
		InsertItem(h,Nil,'Child 2');
		InsertItem(h,Nil,'SChild 3');
		ExpandItem[h] := True;
	end;
end
839
How can I display true or false instead 0 and -1
with AxG2antt1 do
begin
	(Columns.Add('Boolean') as EXG2ANTTLib.Column).FormatColumn := 'value != 0 ? ''true'' : ''false''';
	with Items do
	begin
		AddItem(TObject(True));
		AddItem(TObject(False));
		AddItem(TObject(True));
		AddItem(TObject(0));
		AddItem(TObject(1));
	end;
end
838
Is there any option to print the columns section on each page

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	Chart.LevelCount := 2;
	with Items do
	begin
		h1 := AddItem('Task 1');
		AddBar(h1,'Task','1/2/2001','1/4/2001','K1',Nil);
		h2 := AddItem('Task 2');
		AddBar(h2,'Task','2/5/2001','2/7/2001','K2',Nil);
		AddLink('L1',h1,'K1',h2,'K2');
		Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkStartPos] := TObject(0);
	end;
	EndUpdate();
	with (ComObj.CreateComObject(ComObj.ProgIDToClassID('Exontrol.Print')) as EXPRINTLib.Print) do
	begin
		Options := 'ColumnsOnEveryPage=1';
		PrintExt := (AxG2antt1.GetOcx() as EXG2ANTTLib.G2antt).DefaultDispatch;
		Preview();
	end;
end
837
How do I print the control's content

with AxG2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	with Items do
	begin
		h1 := AddItem('Task 1');
		AddBar(h1,'Task','1/2/2001','1/4/2001','K1',Nil);
		h2 := AddItem('Task 2');
		AddBar(h2,'Task','1/5/2001','1/7/2001','K2',Nil);
		AddLink('L1',h1,'K1',h2,'K2');
		Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkStartPos] := TObject(0);
	end;
	EndUpdate();
	with (ComObj.CreateComObject(ComObj.ProgIDToClassID('Exontrol.Print')) as EXPRINTLib.Print) do
	begin
		PrintExt := (AxG2antt1.GetOcx() as EXG2ANTTLib.G2antt).DefaultDispatch;
		Preview();
	end;
end
836
How can I display icons or images instead numbers
with AxG2antt1 do
begin
	Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 
	'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 
	'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 
	'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
	with (Columns.Add('Icons') as EXG2ANTTLib.Column) do
	begin
		Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1);
		FormatColumn := '''The cell displays the icon <img>''+value+''</img> instead '' + value';
	end;
	with Items do
	begin
		AddItem(TObject(1));
		AddItem(TObject(2));
		AddItem(TObject(3));
	end;
end
835
How can I display the column using currency
with AxG2antt1 do
begin
	(Columns.Add('Currency') as EXG2ANTTLib.Column).FormatColumn := 'currency(dbl(value))';
	with Items do
	begin
		AddItem('1.23');
		AddItem('2.34');
		AddItem('0');
		AddItem(TObject(5));
		AddItem('10000.99');
	end;
end
834
How can I display the currency only for not empty cells
with AxG2antt1 do
begin
	Columns.Add('Number');
	(Columns.Add('Currency') as EXG2ANTTLib.Column).ComputedField := 'len(%0) ? currency(dbl(%0)) : ''''';
	with Items do
	begin
		AddItem('1.23');
		AddItem('2.34');
		AddItem('0');
		ItemBackColor[AddItem(Nil)] := $8080ff;
		AddItem('10000.99');
	end;
end
833
Is there a function to display the number of days between two date including the number of hours
with AxG2antt1 do
begin
	(Columns.Add('Start') as EXG2ANTTLib.Column).Width := 32;
	Columns.Add('End');
	(Columns.Add('Duration') as EXG2ANTTLib.Column).ComputedField := '((1:=int(0:= (date(%1)-date(%0)))) != 0 ? (=:1 + '' day(s)'') : '''') + (=:1 ? '' '' : '''' ) + ((1:=int(0:=((=:0 - =:1 + 1/24/60/60/2)*' + 
	'24))) != 0 ? =:1 + '' hour(s) '' : '''' ) + ((1:=round((=:0 - =:1)*60)) != 0 ? =:1 + '' min(s)'' : '''')';
	with Items do
	begin
		h := AddItem('1/11/2001');
		CellValue[TObject(h),TObject(1)] := '1/14/2001';
		h := AddItem('2/22/2002 12:00:00 PM');
		CellValue[TObject(h),TObject(1)] := '3/14/2002 1:00:00 PM';
		h := AddItem('3/13/2003');
		CellValue[TObject(h),TObject(1)] := '4/11/2003 11:00:00 AM';
	end;
end
832
Is there a function to display the number of days between two date including the number of hours
with AxG2antt1 do
begin
	Columns.Add('Start');
	Columns.Add('End');
	(Columns.Add('Duration') as EXG2ANTTLib.Column).ComputedField := '"D " + int(date(%1)-date(%0)) + " H " + round(24*(date(%1)-date(%0) - floor(date(%1)-date(%0))))';
	with Items do
	begin
		h := AddItem('1/11/2001');
		CellValue[TObject(h),TObject(1)] := '1/14/2001 11:00:00 PM';
		h := AddItem('2/22/2002 12:00:00 PM');
		CellValue[TObject(h),TObject(1)] := '3/14/2002 1:00:00 PM';
		h := AddItem('3/13/2003');
		CellValue[TObject(h),TObject(1)] := '4/11/2003 11:00:00 AM';
	end;
end
831
How can I display the number of days between two dates
with AxG2antt1 do
begin
	Columns.Add('Start');
	Columns.Add('End');
	(Columns.Add('Duration') as EXG2ANTTLib.Column).ComputedField := '(date(%1)-date(%0)) + '' days''';
	with Items do
	begin
		h := AddItem('1/11/2001');
		CellValue[TObject(h),TObject(1)] := '1/14/2001';
		h := AddItem('2/22/2002');
		CellValue[TObject(h),TObject(1)] := '3/14/2002';
		h := AddItem('3/13/2003');
		CellValue[TObject(h),TObject(1)] := '4/11/2003';
	end;
end
830
How can I get second part of the date
with AxG2antt1 do
begin
	Columns.Add('Date');
	(Columns.Add('Second') as EXG2ANTTLib.Column).ComputedField := 'sec(date(%0))';
	with Items do
	begin
		AddItem('1/11/2001 10:10:00 AM');
		AddItem('2/22/2002 11:01:22 AM');
		AddItem('3/13/2003 12:23:01 PM');
		AddItem('4/14/2004 1:11:59 PM');
	end;
end
829
How can I get minute part of the date
with AxG2antt1 do
begin
	Columns.Add('Date');
	(Columns.Add('Minute') as EXG2ANTTLib.Column).ComputedField := 'min(date(%0))';
	with Items do
	begin
		AddItem('1/11/2001 10:10:00 AM');
		AddItem('2/22/2002 11:01:00 AM');
		AddItem('3/13/2003 12:23:00 PM');
		AddItem('4/14/2004 1:11:00 PM');
	end;
end
828
How can I check the hour part only so I know it was afternoon
with AxG2antt1 do
begin
	ConditionalFormats.Add('hour(%0)>=12',Nil).Bold := True;
	Columns.Add('Date');
	(Columns.Add('Hour') as EXG2ANTTLib.Column).ComputedField := 'hour(%0)';
	with Items do
	begin
		AddItem('1/11/2001 10:00:00 AM');
		AddItem('2/22/2002 11:00:00 AM');
		AddItem('3/13/2003 12:00:00 PM');
		AddItem('4/14/2004 1:00:00 PM');
	end;
end
827
What about a function to get the day in the week, or days since Sunday
with AxG2antt1 do
begin
	Columns.Add('Date');
	(Columns.Add('WeekDay') as EXG2ANTTLib.Column).ComputedField := 'weekday(%0)';
	with Items do
	begin
		AddItem('1/11/2001 10:00:00 AM');
		AddItem('2/22/2002 11:00:00 AM');
		AddItem('3/13/2003 12:00:00 PM');
		AddItem('4/14/2004 1:00:00 PM');
	end;
end
826
Is there any function to get the day of the year or number of days since January 1st
with AxG2antt1 do
begin
	Columns.Add('Date');
	(Columns.Add('Day since January 1st') as EXG2ANTTLib.Column).ComputedField := 'yearday(%0)';
	with Items do
	begin
		AddItem('1/11/2001 10:00:00 AM');
		AddItem('2/22/2002 11:00:00 AM');
		AddItem('3/13/2003 12:00:00 PM');
		AddItem('4/14/2004 1:00:00 PM');
	end;
end
825
How can I display only the day of the date
with AxG2antt1 do
begin
	Columns.Add('Date');
	(Columns.Add('Day') as EXG2ANTTLib.Column).ComputedField := 'day(%0)';
	with Items do
	begin
		AddItem('1/11/2001 10:00:00 AM');
		AddItem('2/22/2002 11:00:00 AM');
		AddItem('3/13/2003 12:00:00 PM');
		AddItem('4/14/2004 1:00:00 PM');
	end;
end
824
How can I display only the month of the date
with AxG2antt1 do
begin
	Columns.Add('Date');
	(Columns.Add('Month') as EXG2ANTTLib.Column).ComputedField := 'month(%0)';
	with Items do
	begin
		AddItem('1/1/2001 10:00:00 AM');
		AddItem('2/2/2002 11:00:00 AM');
		AddItem('3/3/2003 12:00:00 PM');
		AddItem('4/4/2004 1:00:00 PM');
	end;
end
823
How can I get only the year part from a date expression
with AxG2antt1 do
begin
	Columns.Add('Date');
	(Columns.Add('Year') as EXG2ANTTLib.Column).ComputedField := 'year(%0)';
	with Items do
	begin
		AddItem('1/1/2001 10:00:00 AM');
		AddItem('2/2/2002 11:00:00 AM');
		AddItem('3/3/2003 12:00:00 PM');
		AddItem('4/4/2004 1:00:00 PM');
	end;
end
822
Can I convert the expression to date
with AxG2antt1 do
begin
	Columns.Add('Number');
	(Columns.Add('Date') as EXG2ANTTLib.Column).ComputedField := 'date(dbl(%0))';
	with Items do
	begin
		AddItem('-1.98');
		AddItem('30000.99');
		AddItem('3561.23');
		AddItem('1232.34');
	end;
end
821
Can I convert the expression to a number, double or float
with AxG2antt1 do
begin
	Columns.Add('Number');
	(Columns.Add('Number + 2') as EXG2ANTTLib.Column).ComputedField := 'dbl(%0)+2';
	with Items do
	begin
		AddItem('-1.98');
		AddItem('0.99');
		AddItem('1.23');
		AddItem('2.34');
	end;
end
820
How can I display dates in long format
with AxG2antt1 do
begin
	Columns.Add('Date');
	(Columns.Add('LongFormat') as EXG2ANTTLib.Column).ComputedField := 'longdate(%0)';
	with Items do
	begin
		AddItem('1/1/2001 10:00:00 AM');
		AddItem('2/2/2002 11:00:00 AM');
		AddItem('3/3/2003 12:00:00 PM');
		AddItem('4/4/2004 1:00:00 PM');
	end;
end
819
How can I display dates in short format
with AxG2antt1 do
begin
	Columns.Add('Date');
	(Columns.Add('ShortFormat') as EXG2ANTTLib.Column).ComputedField := 'shortdate(%0)';
	with Items do
	begin
		AddItem('1/1/2001 10:00:00 AM');
		AddItem('2/2/2002 11:00:00 AM');
		AddItem('3/3/2003 12:00:00 PM');
		AddItem('4/4/2004 1:00:00 PM');
	end;
end
818
How can I display the time only of a date expression
with AxG2antt1 do
begin
	Columns.Add('Date');
	(Columns.Add('Time') as EXG2ANTTLib.Column).ComputedField := '''time is:'' + time(date(%0))';
	with Items do
	begin
		AddItem('1/1/2001 10:00:00 AM');
		AddItem('2/2/2002 11:00:00 AM');
		AddItem('3/3/2003 12:00:00 PM');
		AddItem('4/4/2004 1:00:00 PM');
	end;
end
817
Is there any function to display currencies, or money formatted as in the control panel
with AxG2antt1 do
begin
	Columns.Add('Number');
	(Columns.Add('Currency') as EXG2ANTTLib.Column).ComputedField := 'currency(dbl(%0))';
	with Items do
	begin
		AddItem(TObject(1.23));
		AddItem(TObject(2.34));
		AddItem(TObject(10000.99));
	end;
end
816
How can I convert the expression to a string so I can look into the date string expression for month's name
with AxG2antt1 do
begin
	Columns.Add('Number');
	(Columns.Add('Str') as EXG2ANTTLib.Column).ComputedField := 'str(%0) + '' AA''';
	with Items do
	begin
		AddItem('-1.98');
		AddItem('0.99');
		AddItem('1.23');
		AddItem('2.34');
	end;
end
815
Can I display the absolute value or positive part of the number
with AxG2antt1 do
begin
	Columns.Add('Number');
	(Columns.Add('Abs') as EXG2ANTTLib.Column).ComputedField := 'abs(%0)';
	with Items do
	begin
		AddItem('-1.98');
		AddItem('0.99');
		AddItem('1.23');
		AddItem('2.34');
	end;
end
814
Is there any function to get largest number with no fraction part that is not greater than the value
with AxG2antt1 do
begin
	Columns.Add('Number');
	(Columns.Add('Floor') as EXG2ANTTLib.Column).ComputedField := 'floor(%0)';
	with Items do
	begin
		AddItem('-1.98');
		AddItem('0.99');
		AddItem('1.23');
		AddItem('2.34');
	end;
end
813
Is there any function to round the values base on the .5 value
with AxG2antt1 do
begin
	Columns.Add('Number');
	(Columns.Add('Round') as EXG2ANTTLib.Column).ComputedField := 'round(%0)';
	with Items do
	begin
		AddItem('-1.98');
		AddItem('0.99');
		AddItem('1.23');
		AddItem('2.34');
	end;
end
812
How can I get or display the integer part of the cell
with AxG2antt1 do
begin
	Columns.Add('Number');
	(Columns.Add('Int') as EXG2ANTTLib.Column).ComputedField := 'int(%0)';
	with Items do
	begin
		AddItem('-1.98');
		AddItem('0.99');
		AddItem('1.23');
		AddItem('2.34');
	end;
end
811
How can I display names as proper ( first leter of the word must be in uppercase, and the rest in lowercase )
with AxG2antt1 do
begin
	(Columns.Add('') as EXG2ANTTLib.Column).FormatColumn := 'proper(%0)';
	with Items do
	begin
		h := AddItem('root');
		InsertItem(h,Nil,'child child');
		InsertItem(h,Nil,'child child');
		InsertItem(h,Nil,'child child');
		ExpandItem[h] := True;
	end;
end
810
Is there any option to display cells in uppercase
with AxG2antt1 do
begin
	(Columns.Add('') as EXG2ANTTLib.Column).FormatColumn := 'upper(%0)';
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Nil,'Child 1');
		InsertItem(h,Nil,'Child 2');
		InsertItem(h,Nil,'Chld 3');
		ExpandItem[h] := True;
	end;
end
809
Is there any option to display cells in lowercase
with AxG2antt1 do
begin
	(Columns.Add('') as EXG2ANTTLib.Column).FormatColumn := 'lower(%0)';
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Nil,'Child 1');
		InsertItem(h,Nil,'Child 2');
		InsertItem(h,Nil,'Chld 3');
		ExpandItem[h] := True;
	end;
end
808
How can I mark the cells that has a specified type, ie strings only
with AxG2antt1 do
begin
	ConditionalFormats.Add('type(%0) = 8',Nil).ForeColor := $ff;
	Columns.Add('');
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Nil,'Child 1');
		InsertItem(h,Nil,TObject(2));
		InsertItem(h,Nil,'Chld 3');
		ExpandItem[h] := True;
	end;
end
807
How can I bold the items that contains data or those who displays empty strings
with AxG2antt1 do
begin
	ConditionalFormats.Add('not len(%1)=0',Nil).Bold := True;
	Columns.Add('C1');
	Columns.Add('C2');
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Nil,'Child 1');
		hC := InsertItem(h,Nil,'Child 2');
		CellValue[TObject(hC),TObject(1)] := '1';
		InsertItem(h,Nil,'Child 3');
		ExpandItem[h] := True;
	end;
end
806
Can I change the background color for items or cells that contains a specified string
with AxG2antt1 do
begin
	ConditionalFormats.Add('%0 contains ''hi''',Nil).BackColor := $ff;
	Columns.Add('');
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Nil,'Child 1');
		InsertItem(h,Nil,'Child 2');
		InsertItem(h,Nil,'Chld 3');
		ExpandItem[h] := True;
	end;
end
805
Is there any option to change the fore color for cells or items that ends with a specified string
with AxG2antt1 do
begin
	ConditionalFormats.Add('%0 endwith ''22''',Nil).ForeColor := $ff;
	Columns.Add('');
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Nil,'Child 1');
		InsertItem(h,Nil,'Child 1.22');
		InsertItem(h,Nil,'Child 2.22');
		ExpandItem[h] := True;
	end;
end
804
How can I highlight the cells or items that starts with a specified string
with AxG2antt1 do
begin
	ConditionalFormats.Add('%0 startwith ''C''',Nil).Underline := True;
	Columns.Add('');
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Nil,'Child 1');
		InsertItem(h,Nil,'Child 2');
		InsertItem(h,Nil,'SChild 3');
		ExpandItem[h] := True;
	end;
end
803
How can I change the background color or the visual appearance using ebn for a particular column
with AxG2antt1 do
begin
	VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
	with Columns do
	begin
		Add('Column 1');
		(Add('Column 2') as EXG2ANTTLib.Column).Def[EXG2ANTTLib.DefColumnEnum.exHeaderBackColor] := TObject(16777216);
		(Add('Column 3') as EXG2ANTTLib.Column).Def[EXG2ANTTLib.DefColumnEnum.exHeaderBackColor] := TObject(16777471);
		Add('Column 4');
	end;
end
802
How can I change the foreground color for a particular column
with AxG2antt1 do
begin
	with Columns do
	begin
		Add('Column 1');
		(Add('Column 2') as EXG2ANTTLib.Column).Def[EXG2ANTTLib.DefColumnEnum.exHeaderForeColor] := TObject(8439039);
		Add('Column 3');
	end;
end
801
How can I change the background color for a particular column
with AxG2antt1 do
begin
	with Columns do
	begin
		Add('Column 1');
		(Add('Column 2') as EXG2ANTTLib.Column).Def[EXG2ANTTLib.DefColumnEnum.exHeaderBackColor] := TObject(8439039);
		Add('Column 3');
	end;
end